package com.neu.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.neu.entity.DeptVo;
import com.neu.entity.UserRoleVo;
import com.neu.mapper.SchedulingMapper;
import com.neu.service.SchedulingService;



@Service
public class SchedulingServiceImpl implements SchedulingService{
	@Autowired
	private SchedulingMapper schedulingMapper;
	@Override
	public List<DeptVo> getDeptList() {
		// TODO Auto-generated method stub
		return schedulingMapper.getDeptList();
	}
	@Override
	public List<UserRoleVo> getUserRole(int deptID) {
		// TODO Auto-generated method stub
		return schedulingMapper.getUserRole(deptID);
	}
	@Override
	public List<UserRoleVo> getAllUserRole() {
		// TODO Auto-generated method stub
		return schedulingMapper.getAllUserRole();
	}
	@Override
	public boolean updateRole(UserRoleVo userRoleVo) {
		// TODO Auto-generated method stub
		int upd = schedulingMapper.updateRole(userRoleVo);
		if(upd>0) {
			return true;
		}else {
			return false;
		}
	}
		
}
